package com.ssmTest.service;

import com.ssmTest.model.Order;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;

import java.io.InputStream;
import java.text.ParseException;
import java.util.List;

public interface IReadExcelService {


    //获取总行数
    public int getTotalRows();

    //获取总列数
    public int getTotalCells();

    //获取错误信息
    public String getErrorInfo();

    /**
     * 读EXCEL文件，获取信息集合
     */
    public List<Order> getExcelInfo(MultipartFile mFile);


    public List<Order> createExcel(InputStream is, boolean isExcel2003);


    List<Order> readExcelValue(Workbook wb) throws ParseException;


    List<Order> readTableValue(Sheet sheet) throws ParseException;


    public boolean validateExcel(String filePath);

    //生成Excel表
    public void generaExcel(List<Order> list);


    // @描述：是否是2003的excel，返回true是2003
    public boolean isExcel2003(String filePath);

    //@描述：是否是2007的excel，返回true是2007
    public boolean isExcel2007(String filePath);
}